<h2 class="search-title popSearchTitle">Add Note</h2>
<div class="ques-popup">
    <form action="" method="post" id="message">
    <?php foreach($ids as $id):?>
    <input type="hidden" value="<?php echo $id;?>" name="id[]" />
    <?php endforeach; ?>

<fieldset>
    <label>Your Note :</label>
    <textarea name="note"></textarea>
</fieldset>
<fieldset class="btn">
  <input type="button" value="Cancel" name="" class="popupClose" />
  <input type="submit" value="Send" name="sendMessege" />
</fieldset>
</form>
</div>
<script type="text/javascript">
    jQuery(document).ready(function(){
        var content='<p>Your note was successfully added</p><br /><input type="button" value="Close" onclick=disablePopup(); />';
	jQuery('input:submit[name="sendMessege"]').click(function(){
	var dataString=jQuery('#message').serialize();
	jQuery.ajax({
			type: "post",
			url: baseurl+"/users/save_all_favorite",
			data: dataString,
			success: function(data) {
                            jQuery('.ques-popup').fadeOut();
                            jQuery('.ques-popup').remove();
                            jQuery("#ajaxLoad").load(""+baseurl+"users/favorite_seller #ajaxLoad");
                            jQuery(content).insertAfter('.popSearchTitle');
			}
		});
		return false;
	});
});

jQuery('.popupClose').click(function(){
    disablePopup();
});
</script>
